int read_inode_from_file(uint64_t inode_segment, uint32_t inode_offset, struct lhdfs_ctrl *ctrl)
{	
	/* offset in inode structure */
	int log_inode = sizeof(ctrl->inode.lfs_ipos);
	int inode_size = log_inode + sizeof(ctrl->inode.lfs_isize);
	int log_num = inode_size + sizeof(ctrl->inode.lfs_lognum);
	int segno = log_num + sizeof(ctrl->inode.lfs_segno_offset);
	int level1_index = segno + sizeof(ctrl->inode.lfs_blocks);
	int level2_index = level1_inodex + sizeof(ctrl->inode.lfs_ib);
	int level3_index = level2_index + sizeof(ctrl->inode.lfs_doubly_ib);
	int level4_index = level3_index + sizeof(ctrl->inode.lfs_triply_ib);

	if (inode_offset != level4_index) {
		printf("read inode size error!\n");
		return -1;
	} else {
		ctrl->inode.lfs_ipos = make_storage_address(inode_segment, log_inode);
		ctrl->inode.lfs_isize = make_storage_address(inode_segment, inode_size);
		ctrl->inode.lfs_lognum = make_storage_address(inode_segment,log_num);
		ctrl->inode.lfs_segno_offset = make_storage_address(inode_segment, segno);
		ctrl->inode.lfs_blocks = make_storage_address(inode_segment, level1_index);
		ctrl->inode.lfs_doubly_ib = make_storage_address(inode_segment, level2_index);
		ctrl->inode.lfs_triply_ib = make_storage_address(inode_segment, level3.index);
	}

	return 0;
}

